﻿using Microsoft.Owin.Extensions;
using Owin;
using System.Web.Http;

namespace Sustainalytics.ClientInterface.AngularHosting.Service
{
    public class Startup
    {
        // This code configures Web API. The Startup class is specified as a type
        // parameter in the WebApp.Start method.
        //
        public void Configuration(IAppBuilder appBuilder)
        {
            // Add Nancy to the OWIN pipeline.
            //  Note, because this is registered last we don't need to worry 
            //  about falling-through to any other middleware. Any requests to
            //  /api/... will be handled by WebAPI first, and anything else
            //  will fall through to Nancy
            //
            //appBuilder.UseStaticFiles("/test");

            appBuilder.UseNancy();

            appBuilder.UseStageMarker(PipelineStage.MapHandler);
        }
    }
}
